import request from './index'
export interface book_Listv1 {
  page: number
  limit: number
  State: string
}
export interface book_Room {
  HomeClassId: number
  CheckIn: string
  CheckOut: string
  BookId: string
}
export interface Order_Book_ID {
  id: string // 订单id
}
export interface BOOK_LIST {
  Id: string | null
  Name: string | null
  CreationDate: string | null
  ModifyDate: string | null
  CheckIn: string | null
  CheckOut: string | null
  XsName: string | null
  TheCompany: string | null
  LinkId: string | null
  TheClass: string | null
  Note: string | null
  State: string | null
  RoomClassCount: string | null
  Receiver: string | null
  RoomState: string | null
  Rooms: string | null
  Deposit: string | null
  ReceiveInClass: string | null
  BreakFastNum: string | null
  BookNum: string | null
  CheckInRooms: string | null
  IsMeetingBook: boolean
  BookType: string | null
  roomInfos: Array<any> | null
}
// 预订列表
export function BookListv1(data: book_Listv1) {
  return request({
    url: '/Book/Listv1',
    data
  })
}
// 获取全部房型
export interface INF_GetHomeClassList_res {
  Id: string
  Name: string
  HourLen: number
  HourPrice: number
  HourUnit: number
  MidPrice: null | number
  NormalPrice: number
  AppPrice: number
  Total: number
  DayPrice: null | number
  SelfPrice: null | number
  Deposit: null | number
  Img: null | string
}
export function GetHomeClassList() {
  return request({
    url: '/Home/GetHomeClassList'
  })
}
// 获取房型对应房号
export function GetRoomsForAssign(data: book_Room) {
  return request({
    url: '/Book/GetRoomsForAssign',
    data
  })
}
//获取客源列表
export interface INF_GetManclass_res {
  Id: string
  Sort: number
  BreakFast: number
  Lunch: number
  Dinner: number
}
export function GetManclass() {
  return request({
    url: '/Config/GetManclass'
  })
}
//预定----订金明细
export function BookMoneyList(data: Order_Book_ID) {
  return request({
    url: '/Book/BookMoneyList',
    data
  })
}
//取消--预订
export function CancelBook(data) {
  return request({
    url: '/Book/CancelBook',
    method: 'DELETE',
    data
  })
}
//新增预订
export function newbook(data) {
  return request({
    url: '/Book/NewBook',
    method: 'post',
    data
  })
}
export interface book_log {
  page: number
  limit: number
  ReceiveId: string
}
//预订订单日志/System/OpLogs
export function BookOpLogs(data) {
  return request({
    url: '/System/OpLogs',
    data
  })
}
// 获取预订的房间数量 /SelfCheckin/GetBookedNumV1
export function GetBookedNumV1(data: Order_Book_ID) {
  return request({
    url: '/SelfCheckin/GetBookedNumV1',
    data
  })
}
